<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>订单详情页面</title>
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script>
            $(function() {
                $(".meun-item").click(function() {
                    $(".meun-item").removeClass("meun-item-active");
                    $(this).addClass("meun-item-active");
                    var itmeObj = $(".meun-item").find("img");
                    itmeObj.each(function() {
                        var items = $(this).attr("src");
                        items = items.replace("_grey.png", ".png");
                        items = items.replace(".png", "_grey.png")
                        $(this).attr("src", items);
                    });
                    var attrObj = $(this).find("img").attr("src");
                    ;
                    attrObj = attrObj.replace("_grey.png", ".png");
                    $(this).find("img").attr("src", attrObj);
                });
                $("#topAD").click(function() {
                    $("#topA").toggleClass(" glyphicon-triangle-right");
                    $("#topA").toggleClass(" glyphicon-triangle-bottom");
                });
                $("#topBD").click(function() {
                    $("#topB").toggleClass(" glyphicon-triangle-right");
                    $("#topB").toggleClass(" glyphicon-triangle-bottom");
                });
                $("#topCD").click(function() {
                    $("#topC").toggleClass(" glyphicon-triangle-right");
                    $("#topC").toggleClass(" glyphicon-triangle-bottom");
                });
                $(".toggle-btn").click(function() {
                    $("#leftMeun").toggleClass("show");
                    $("#rightContent").toggleClass("pd0px");
                })
            })
        </script>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="css/common.css" />
<link rel="stylesheet" type="text/css" href="css/slide.css" />
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="css/flat-ui.min.css" />
<link rel="stylesheet" type="text/css" href="css/jquery.nouislider.css">
</head>
<body>
	<div role="tabpanel" class="tab-pane">
		<div class="check-div form-inline">
			<div class="col-xs-3">
				<button class="btn btn-yellow btn-xs" onclick="javascrtpt:window.location.href='selectAllProduct'"
					aria-controls="user" role="tab" data-toggle="tab">返回主页</button>
				<button class="btn btn-success btn-xs" onclick="upStatus(${sessionScope.oid})"
							aria-controls="user" role="tab" data-toggle="tab">确认订单</button>
			</div>
		</div>
		<div class="data-div">
			<div class="row tableHeader">
				<div class="col-xs-2 ">订单id</div>
				<div class="col-xs-2 ">菜名</div>
				<div class="col-xs-2">价格</div>
				<div class="col-xs-2">数量</div>
				<div class="col-xs-2">创建时间</div>
			</div>

			<div class="tablebody" id="update">
				<c:forEach items="${lod }" var="l">
					<div class="row" id="update1">
						<div class="col-xs-2 " id="i1">${l.order_id }</div>
						<div class="col-xs-2" id="i2">${l.product_name }</div>
						<div class="col-xs-2" id="i3">${l.product_price }</div>
						<div class="col-xs-2" id="i5">${l.product_quantity }</div>
						<div class="col-xs-2" id="i4">${l.create_time }</div>
						<div class="col-xs-2">
						</div>
					</div>
				</c:forEach>
			</div>
		</div>
	</div>

	<script type="text/javascript">
	/* 删除订单详情 */
	function upStatus(order_id){
		$.ajax({
		url: "upStatus", //要请求的服务器url
	    data: {
		   order_id: order_id,
	   }, 
	   async: true,   //是否为异步请求
	   cache: false,  //是否缓存结果
	   type: "POST", //请求方式为POST
	   dataType: "text",   //服务器返回的数据是什么类型 
	   success: function(data){
		   if(data=="success"){
			   alert("已确认");
		   }
	   }
		});
	}
	</script>
</body>
</html>